News All Tests
Current file: /home/estudydev/workspace/MSP09/web/news/tests/class.SettingsDialog.inc.php
Legend: executed not executed dead code

  Coverage
  Classes Methods Lines
Total
100.00 %100.00%
100.00% 1 / 1
0.00 %0.00%
0.00% 0 / 31
1.15 %1.15%
1.15% 4 / 347
 
SettingsDialog
100.00 %100.00%
100.00% 1 / 1
0.00 %0.00%
0.00% 0 / 31
0.29 %0.29%
0.29% 1 / 344
 public function SettingsDialog($settings, $assistModus = false)
0.00 %0.00%
0.00% 0 / 1
0.00 %0.00%
0.00% 0 / 59
 private function printCheckOutRow($value)
0.00 %0.00%
0.00% 0 / 1
0.00 %0.00%
0.00% 0 / 5
 public function printHead()
0.00 %0.00%
0.00% 0 / 1
0.00 %0.00%
0.00% 0 / 2
 public function printHeadlineRow($headline)
0.00 %0.00%
0.00% 0 / 1
0.00 %0.00%
0.00% 0 / 3
 public function printTeachersRow($teachers)
0.00 %0.00%
0.00% 0 / 1
0.00 %0.00%
0.00% 0 / 14
 public function printNewTeacherRow($allTeachers, $teachersCourse, $assistentsNew = NULL)
0.00 %0.00%
0.00% 0 / 1
0.00 %0.00%
0.00% 0 / 30
 public function printAssistentsRow($assistents)
0.00 %0.00%
0.00% 0 / 1
0.00 %0.00%
0.00% 0 / 12
 public function printNewAssistentRow($noAssistents)
0.00 %0.00%
0.00% 0 / 1
0.00 %0.00%
0.00% 0 / 13
 public function printNameRow()
0.00 %0.00%
0.00% 0 / 1
0.00 %0.00%
0.00% 0 / 9
 public function printShortNameRow()
0.00 %0.00%
0.00% 0 / 1
0.00 %0.00%
0.00% 0 / 9
 public function printModulShortCutRow()
0.00 %0.00%
0.00% 0 / 1
0.00 %0.00%
0.00% 0 / 9
 public function printKeywords()
0.00 %0.00%
0.00% 0 / 1
0.00 %0.00%
0.00% 0 / 9
 public function printSemesterRow()
0.00 %0.00%
0.00% 0 / 1
0.00 %0.00%
0.00% 0 / 9
 public function printStyleRow()
0.00 %0.00%
0.00% 0 / 1
0.00 %0.00%
0.00% 0 / 12
 public function printCloseRow()
0.00 %0.00%
0.00% 0 / 1
0.00 %0.00%
0.00% 0 / 16
 private function isCourse()
0.00 %0.00%
0.00% 0 / 1
0.00 %0.00%
0.00% 0 / 1
 public function printChangeViewRow()
0.00 %0.00%
0.00% 0 / 1
0.00 %0.00%
0.00% 0 / 5
 public function printInfoRow()
0.00 %0.00%
0.00% 0 / 1
0.00 %0.00%
0.00% 0 / 11
 public function printFaqRow()
0.00 %0.00%
0.00% 0 / 1
0.00 %0.00%
0.00% 0 / 8
 public function printPeriodRow()
0.00 %0.00%
0.00% 0 / 1
0.00 %0.00%
0.00% 0 / 23
 public function printPasswordRow()
0.00 %0.00%
0.00% 0 / 1
0.00 %0.00%
0.00% 0 / 9
 public function printUseWaitinglistRow()
0.00 %0.00%
0.00% 0 / 1
0.00 %0.00%
0.00% 0 / 9
 public function printMaxStudentsRow()
0.00 %0.00%
0.00% 0 / 1
0.00 %0.00%
0.00% 0 / 9
 public function printHeadAddUser()
0.00 %0.00%
0.00% 0 / 1
0.00 %0.00%
0.00% 0 / 2
 public function printAddUserRow()
0.00 %0.00%
0.00% 0 / 1
0.00 %0.00%
0.00% 0 / 24
 public function printFoot()
0.00 %0.00%
0.00% 0 / 1
0.00 %0.00%
0.00% 0 / 8
 public function printFootAddUser()
0.00 %0.00%
0.00% 0 / 1
0.00 %0.00%
0.00% 0 / 7
 public function printAssist()
0.00 %0.00%
0.00% 0 / 1
0.00 %0.00%
0.00% 0 / 3
 public function printTeachersDesc()
0.00 %0.00%
0.00% 0 / 1
0.00 %0.00%
0.00% 0 / 4
 public function printSubscribeDesc()
0.00 %0.00%
0.00% 0 / 1
0.00 %0.00%
0.00% 0 / 6
 public function printViewDesc()
0.00 %0.00%
0.00% 0 / 1
0.00 %0.00%
0.00% 0 / 3


       1                 : <?php                                                                                                                                                                                                                           
       2                 : /*--------------------------------------------------------------------------+                                                                                                                                                   
       3                 : This file is part of eStudy.                                                                                                                                                                                                    
       4                 : courses/classes/class.SettingsDialog.inc.php                                                                                                                                                                                    
       5                 : - Modulgruppe:  Veranstaltungen                                                                                                                                                                                                 
       6                 : - Beschreibung: Dialog fuer Veranstaltungseinstellungen.                                                                                                                                                                        
       7                 : - Version:      0.4, 06/03/04                                                                                                                                                                                                   
       8                 : - Autor(en):    Timo Fuchs <timo.fuchs@mni.fh-giessen.de>                                                                                                                                                                       
       9                 : +---------------------------------------------------------------------------+                                                                                                                                                   
      10                 : This program is free software; you can redistribute it and/or                                                                                                                                                                   
      11                 : modify it under the terms of the GNU General Public License                                                                                                                                                                     
      12                 : as published by the Free Software Foundation; either version 2                                                                                                                                                                  
      13                 : of the License, or any later version.                                                                                                                                                                                           
      14                 : +---------------------------------------------------------------------------+                                                                                                                                                   
      15                 : This program is distributed in the hope that it will be useful,                                                                                                                                                                 
      16                 : but WITHOUT ANY WARRANTY; without even the implied warranty of                                                                                                                                                                  
      17                 : MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                                                                                                                                                   
      18                 : GNU General Public License for more details.                                                                                                                                                                                    
      19                 : You should have received a copy of the GNU General Public License                                                                                                                                                               
      20                 : along with this program; if not, write to the Free Software                                                                                                                                                                     
      21                 : Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.                                                                                                                                                     
      22                 : +--------------------------------------------------------------------------*/                                                                                                                                                   
      23                 :                                                                                                                                                                                                                                 
      24                 : /**                                                                                                                                                                                                                             
      25                 :  * In dieser Datei wird die Klasse SettingsDialog implementiert.                                                                                                                                                                
      26                 :  * @package eStudy.Courses                                                                                                                                                                                                      
      27                 :  * @version 0.4, 06/03/04                                                                                                                                                                                                       
      28                 :  * @author Timo Fuchs <timo.fuchs@mni.fh-giessen.de>                                                                                                                                                                            
      29                 :  */                                                                                                                                                                                                                             
      30                 :                                                                                                                                                                                                                                 
      31                 : /** Semester-Listbox*/                                                                                                                                                                                                          
      32               1 : require_once("class.CourseUtil.inc.php");                                                                                                                                                                                       
      33                 : /** Datumsauswahl*/                                                                                                                                                                                                             
      34               1 : require_once("class.dateselection.inc.php");                                                                                                                                                                                    
      35                 :                                                                                                                                                                                                                                 
      36               1 : require_once("class.CourseCreateDialog.inc.php");                                                                                                                                                                               
      37                 : /**                                                                                                                                                                                                                             
      38                 :  * Repraesentiert einen Dialog fuer die Veranstaltungseinstellungen.                                                                                                                                                            
      39                 :  *                                                                                                                                                                                                                              
      40                 :  * @package eStudy.Courses                                                                                                                                                                                                      
      41                 :  * @author   Timo Fuchs <timo.fuchs@mni.fh-giessen.de>                                                                                                                                                                          
      42                 :  * @version  0.4, 06/03/04                                                                                                                                                                                                      
      43                 :  */                                                                                                                                                                                                                             
      44               1 : class SettingsDialog {                                                                                                                                                                                                          
      45                 :                                                                                                                                                                                                                                 
      46                 :     var $settings;                                                                                                                                                                                                              
      47                 :                                                                                                                                                                                                                                 
      48                 :     /**                                                                                                                                                                                                                         
      49                 :      * Konstruktor.                                                                                                                                                                                                             
      50                 :      *                                                                                                                                                                                                                          
      51                 :      * @access public                                                                                                                                                                                                           
      52                 :      * @return void                                                                                                                                                                                                             
      53                 :      */                                                                                                                                                                                                                         
      54                 :     function SettingsDialog($settings, $assistModus = false) {                                                                                                                                                                  
      55               0 :         global $db;                                                                                                                                                                                                             
      56                 :                                                                                                                                                                                                                                 
      57               0 :         $this->settings = $settings;                                                                                                                                                                                            
      58                 :                                                                                                                                                                                                                                 
      59               0 :         $teachersCourse = Course::getParticipants((int)$this->settings->getID(), "teacher");                                                                                                                                    
      60                 :                                                                                                                                                                                                                                 
      61               0 :         $allTeachersQ  = "SELECT ID, Nachname, Vorname, Shortname ";                                                                                                                                                            
      62               0 :         $allTeachersQ .= "FROM user WHERE Usergroup=3 ORDER BY Nachname, Vorname";                                                                                                                                              
      63               0 :         $allTeachers   = $db->get_results($allTeachersQ);                                                                                                                                                                       
      64                 :                                                                                                                                                                                                                                 
      65               0 :         $assistentsCourse = Course::getParticipants((int)$_SESSION['course'], "assistent");                                                                                                                                     
      66               0 :         $assistentsNew    = Course::getPossibleAssistents((int)$_SESSION['course']);                                                                                                                                            
      67               0 :         if(AssistController::$assist == 1){ $this->printAssist();}                                                                                                                                                              
      68               0 :         $this->printHead();                                                                                                                                                                                                     
      69               0 :         $this->printHeadlineRow("Allgemeine Einstellungen");                                                                                                                                                                    
      70               0 :         $this->printNameRow();                                                                                                                                                                                                  
      71               0 :         $this->printShortNameRow();                                                                                                                                                                                             
      72                 :                                                                                                                                                                                                                                 
      73                 :         // Sonderbehandlung MNI-Kurs                                                                                                                                                                                            
      74               0 :         if ($this->settings->getModulbeschreibung_ID() > 0) {                                                                                                                                                                   
      75                 :             // Falls MNI-Kurs                                                                                                                                                                                                   
      76               0 :             global $eStudyPage;                                                                                                                                                                                                 
      77               0 :             CourseCreateDialog::printModulShortCutSelectRow();                                                                                                                                                                  
      78               0 :             CourseCreateDialog::printModulTitelSelectRow();                                                                                                                                                                     
      79               0 :             $xi = new XmlImport();                                                                                                                                                                                              
      80               0 :             $modulbeschreibung = $xi->get_modul_by_modulID($this->settings->getModulbeschreibung_ID());                                                                                                                         
      81                 :                                                                                                                                                                                                                                 
      82               0 :             $eStudyPage->appendInlineJavaScript("<script type='text/javascript'>".CourseCreateDialog::getJavaScript()."</script>");                                                                                             
      83               0 :             $eStudyPage->appendInlineJavaScript("<script type='text/javascript'>" .                                                                                                                                             
      84               0 :                     "document.getElementById('modulSC').value = '".$modulbeschreibung->modulkuerzel."';".                                                                                                                       
      85               0 :                     "document.getElementById('modultitle').value = getModultitelbyModulkuerzel('". $modulbeschreibung->modulkuerzel."')</script>");                                                                             
      86               0 :         } else {                                                                                                                                                                                                                
      87               0 :             $this->printModulShortCutRow();                                                                                                                                                                                     
      88                 :         }                                                                                                                                                                                                                       
      89                 :                                                                                                                                                                                                                                 
      90               0 :         $this->printKeywords();                                                                                                                                                                                                 
      91               0 :         $this->printSemesterRow();                                                                                                                                                                                              
      92               0 :         $this->printStyleRow();                                                                                                                                                                                                 
      93               0 :         $this->printCheckOutRow( Course::getCheckOutNotice($_SESSION['course']) );                                                                                                                                              
      94               0 :         if ($_SESSION["usergroup"] != STUDENT) $this->printCloseRow();                                                                                                                                                          
      95               0 :         $this->printHeadlineRow("Kurs-/eCom-Leitung");                                                                                                                                                                          
      96               0 :         if(AssistController::$assist == 1) { $this->printTeachersDesc(); }                                                                                                                                                      
      97               0 :         $this->printTeachersRow($teachersCourse);                                                                                                                                                                               
      98               0 :         $this->printNewTeacherRow($allTeachers, $teachersCourse, $assistentsNew);                                                                                                                                               
      99               0 :         if(is_array($assistentsCourse) && count($assistentsCourse) > 0) {                                                                                                                                                       
     100               0 :             $this->printAssistentsRow($assistentsCourse);                                                                                                                                                                       
     101               0 :         }                                                                                                                                                                                                                       
     102               0 :         if(is_array($assistentsNew) && count($assistentsNew) > 0) {                                                                                                                                                             
     103               0 :             $this->printNewAssistentRow($assistentsNew);                                                                                                                                                                        
     104               0 :         }                                                                                                                                                                                                                       
     105                 :                                                                                                                                                                                                                                 
     106               0 :         $this->printHeadlineRow("Anmeldeverfahren");                                                                                                                                                                            
     107               0 :            if(AssistController::$assist == 1) { $this->printSubscribeDesc(); }                                                                                                                                                  
     108               0 :         $this->printMaxStudentsRow();                                                                                                                                                                                           
     109               0 :         $this->printPasswordRow();                                                                                                                                                                                              
     110               0 :         $this->printPeriodRow();                                                                                                                                                                                                
     111               0 :         $this->printUseWaitinglistRow();                                                                                                                                                                                        
     112                 :                                                                                                                                                                                                                                 
     113               0 :         if ($_SESSION["usergroup"] != STUDENT) {                                                                                                                                                                                
     114               0 :             $this->printHeadlineRow("Sichtweise tempor&auml;r &auml;ndern");                                                                                                                                                    
     115               0 :                if(AssistController::$assist == 1) { $this->printViewDesc(); }                                                                                                                                                   
     116               0 :             $this->printChangeViewRow();                                                                                                                                                                                        
     117               0 :         }                                                                                                                                                                                                                       
     118               0 :         $this->printHeadlineRow("Allgemein zug&auml;ngliche Informationen");                                                                                                                                                    
     119               0 :         $this->printInfoRow();                                                                                                                                                                                                  
     120               0 :         $this->printFoot();                                                                                                                                                                                                     
     121                 :                                                                                                                                                                                                                                 
     122               0 :         $this->printHeadAddUser();                                                                                                                                                                                              
     123               0 :         $this->printHeadlineRow("Manuelles Hinzuf&uuml;gen von Kurs-/eCom-Teilnehmern");                                                                                                                                        
     124               0 :         $this->printAddUserRow();                                                                                                                                                                                               
     125               0 :         $this->printFootAddUser();                                                                                                                                                                                              
     126               0 :     }                                                                                                                                                                                                                           
     127                 :                                                                                                                                                                                                                                 
     128                 :     private function printCheckOutRow( $value ) {                                                                                                                                                                               
     129               0 :         $checked = ($value) ? "checked='checked'" : "";                                                                                                                                                                         
     130                 :         echo "<tr>"                                                                                                                                                                                                             
     131                 :             ."<td class='tableCell' valign='top'></td>\n"                                                                                                                                                                       
     132               0 :             ."<td class='tableCell'>"                                                                                                                                                                                           
     133               0 :           ."<input type='checkbox' name='CheckOutNotice'$checked value='1'/>E-Mail Benachrichtigung bei Abmeldung von Kursteilnehmern</td>\n"                                                                                   
     134               0 :           ."</tr>";                                                                                                                                                                                                             
     135               0 :     }                                                                                                                                                                                                                           
     136                 :                                                                                                                                                                                                                                 
     137                 :     /**                                                                                                                                                                                                                         
     138                 :      * Gibt die Kopfelemente aus.                                                                                                                                                                                               
     139                 :      *                                                                                                                                                                                                                          
     140                 :      * @access private                                                                                                                                                                                                          
     141                 :      * @return void                                                                                                                                                                                                             
     142                 :      */                                                                                                                                                                                                                         
     143                 :     function printHead() {                                                                                                                                                                                                      
     144                 :         echo "<form action='settings.php' method='post' >\n"                                                                                                                                                                    
     145                 :             ."<p class='pForm'><input type='hidden' name='action' value='save'/></p>\n"                                                                                                                                         
     146               0 :             ."<table class='contentTable' border='0' cellpadding='0' cellspacing='0'>\n";                                                                                                                                       
     147               0 :     }                                                                                                                                                                                                                           
     148                 :                                                                                                                                                                                                                                 
     149                 :     /**                                                                                                                                                                                                                         
     150                 :      * Gibt Zeile mit Tabellenueberschrift aus.                                                                                                                                                                                 
     151                 :      *                                                                                                                                                                                                                          
     152                 :      * @access private                                                                                                                                                                                                          
     153                 :      * @return void                                                                                                                                                                                                             
     154                 :      */                                                                                                                                                                                                                         
     155                 :     function printHeadlineRow($headline) {                                                                                                                                                                                      
     156                 :         echo "<tr>"                                                                                                                                                                                                             
     157               0 :             ."<td class='tableHead' colspan='3'>$headline</td>"                                                                                                                                                                 
     158               0 :             ."</tr>\n";                                                                                                                                                                                                         
     159               0 :     }                                                                                                                                                                                                                           
     160                 :                                                                                                                                                                                                                                 
     161                 :     /**                                                                                                                                                                                                                         
     162                 :      * Gibt Zeile mit Uebersicht ueber die an einer Veranstaltung                                                                                                                                                               
     163                 :      * teilnehmenden Dozenten aus.                                                                                                                                                                                              
     164                 :      * Administratoren ist es durch einen Verweis moeglich Dozenten aus                                                                                                                                                         
     165                 :      * der Veranstaltung zu entfernen. Jedoch nur, wenn es mindestens                                                                                                                                                           
     166                 :      * zwei Dozenten in der Veranstaltung gibt.                                                                                                                                                                                 
     167                 :      *                                                                                                                                                                                                                          
     168                 :      * @access private                                                                                                                                                                                                          
     169                 :      * @return void                                                                                                                                                                                                             
     170                 :      */                                                                                                                                                                                                                         
     171                 :     function printTeachersRow($teachers) {                                                                                                                                                                                      
     172               0 :         global $_SESSION;                                                                                                                                                                                                       
     173                 :                                                                                                                                                                                                                                 
     174                 :         echo "<tr>"                                                                                                                                                                                                             
     175                 :             ."<td class='tableCell' valign='top'>Dozent(en)/Moderator(en)</td>\n"                                                                                                                                               
     176               0 :             ."<td class='tableCell'>"                                                                                                                                                                                           
     177               0 :             ."<table border='0' cellpadding='0' cellspacing='0'>";                                                                                                                                                              
     178                 :                                                                                                                                                                                                                                 
     179               0 :         foreach($teachers as $teacher) {                                                                                                                                                                                        
     180                 :             echo "<tr>"                                                                                                                                                                                                         
     181               0 :                 ."<td class='tableCell' >".Data::toHTML($teacher->lastname.", ".$teacher->firstname." (".$teacher->shortname, false).")</td>"                                                                                   
     182               0 :                 ."<td class='tableCell' >";                                                                                                                                                                                     
     183               0 :                 if((count($teachers) > 1) && (($_SESSION['usergroup'] == ADMIN) || ($_SESSION['usergroup'] == DOZENT)))                                                                                                         
     184               0 :                     echo "&nbsp;<a href ='".PATH_TO_ROOT.SCRIPT_NAME."?action=deleteTeacher&amp;teacher=".$teacher->userid."'>Dozenten-/Moderatorenrecht entziehen</a>";                                                        
     185               0 :             echo "</td></tr>";                                                                                                                                                                                                  
     186               0 :         }                                                                                                                                                                                                                       
     187                 :                                                                                                                                                                                                                                 
     188                 :         echo "</table>"                                                                                                                                                                                                         
     189                 :             ."</td>\n"                                                                                                                                                                                                          
     190               0 :             ."<td class='tableCell'>";                                                                                                                                                                                          
     191               0 :         Utilities::help(55);                                                                                                                                                                                                    
     192               0 :         echo "</td></tr>\n";                                                                                                                                                                                                    
     193               0 :     }                                                                                                                                                                                                                           
     194                 :                                                                                                                                                                                                                                 
     195                 :     /**                                                                                                                                                                                                                         
     196                 :      * Gibt Zeile mit Auswahlmoeglichkeit zum hinzufuegen eines Dozenten aus.                                                                                                                                                   
     197                 :      * Formularelement hat den Namen 'newTeacherID'. Auf den Wert kann mit                                                                                                                                                      
     198                 :      * $newTeacherID zugegriffen werden. Wird kein Dozent gewaehlt, bekommt                                                                                                                                                     
     199                 :      * $newTeacherID den Wert -1. Das verarbeitende Skript muss dies                                                                                                                                                            
     200                 :      * beruecksichtigen.                                                                                                                                                                                                        
     201                 :      *                                                                                                                                                                                                                          
     202                 :      * @access private                                                                                                                                                                                                          
     203                 :      * @return void                                                                                                                                                                                                             
     204                 :      */                                                                                                                                                                                                                         
     205                 :     function printNewTeacherRow($allTeachers, $teachersCourse, $assistentsNew = null) {                                                                                                                                         
     206                 :         echo "<tr>"                                                                                                                                                                                                             
     207                 :             ."<td class='tableCell'>Dozent/Moderator hinzuf&uuml;gen</td>\n"                                                                                                                                                    
     208               0 :             ."<td class='tableCell'>"                                                                                                                                                                                           
     209               0 :             ."<select name='newTeacherID'>"                                                                                                                                                                                     
     210               0 :             ."<option value='-1'>keinen-----------------------------------</option>";                                                                                                                                           
     211                 :                                                                                                                                                                                                                                 
     212                 :         // Ist bei Neuinstallation u.U. leer                                                                                                                                                                                    
     213               0 :         if($allTeachers) {                                                                                                                                                                                                      
     214               0 :             foreach($allTeachers as $teacher) {                                                                                                                                                                                 
     215               0 :                 $isEvenThere = 0;                                                                                                                                                                                               
     216               0 :                 foreach($teachersCourse as $teacherCourse) {                                                                                                                                                                    
     217               0 :                     if($teacherCourse->userid == $teacher->ID) {                                                                                                                                                                
     218               0 :                         $isEvenThere = 1;                                                                                                                                                                                       
     219               0 :                         break;                                                                                                                                                                                                  
     220                 :                     }                                                                                                                                                                                                           
     221               0 :                 }                                                                                                                                                                                                               
     222                 :                                                                                                                                                                                                                                 
     223               0 :                 if($isEvenThere === 0) {                                                                                                                                                                                        
     224               0 :                     echo "<option value='".$teacher->ID."'";                                                                                                                                                                    
     225               0 :                     if(isset($_POST['newTeacherID']) && ($_POST['newTeacherID'] == $teacher->ID)) {                                                                                                                             
     226               0 :                         echo " selected='selected'";                                                                                                                                                                            
     227               0 :                     }                                                                                                                                                                                                           
     228               0 :                     echo ">".Data::toHTML($teacher->Nachname.", ".$teacher->Vorname." (".$teacher->Shortname, false).")</option>";                                                                                              
     229               0 :                 }                                                                                                                                                                                                               
     230               0 :             }                                                                                                                                                                                                                   
     231               0 :         }                                                                                                                                                                                                                       
     232                 :                                                                                                                                                                                                                                 
     233                 :         // Studenten, die auch den Kurs leiten könnten                                                                                                                                                                         
     234               0 :         if ($assistentsNew) {                                                                                                                                                                                                   
     235               0 :             echo "<option value='-1'>Mitglieder--------------------------------</option>";                                                                                                                                      
     236               0 :             foreach ($assistentsNew as $student) {                                                                                                                                                                              
     237               0 :                 echo "<option value='$student->userid'>".Data::toHTML($student->lastname.", ".$student->firstname, false)."</option>";                                                                                          
     238               0 :             }                                                                                                                                                                                                                   
     239               0 :         }                                                                                                                                                                                                                       
     240                 :                                                                                                                                                                                                                                 
     241                 :         echo "</select></td>\n"                                                                                                                                                                                                 
     242               0 :             ."<td class='tableCell'>";                                                                                                                                                                                          
     243               0 :         Utilities::help(56);                                                                                                                                                                                                    
     244               0 :         echo "</td></tr>\n";                                                                                                                                                                                                    
     245               0 :     }                                                                                                                                                                                                                           
     246                 :                                                                                                                                                                                                                                 
     247                 :     /**                                                                                                                                                                                                                         
     248                 :      * Gibt Zeile mit Uebersicht ueber die an einer Veranstaltung teilnehmenden                                                                                                                                                 
     249                 :      * Tutoren aus.                                                                                                                                                                                                             
     250                 :      * Durch einen Verweis hinter dem Namen des jeweiligen Tutors                                                                                                                                                               
     251                 :      * ist es moeglich, dem Benutzer das Tutorenrecht fuer diese                                                                                                                                                                
     252                 :      * Veranstaltung zu entziehen.                                                                                                                                                                                              
     253                 :      *                                                                                                                                                                                                                          
     254                 :      * @access private                                                                                                                                                                                                          
     255                 :      * @return void                                                                                                                                                                                                             
     256                 :      */                                                                                                                                                                                                                         
     257                 :     function printAssistentsRow($assistents) {                                                                                                                                                                                  
     258               0 :         global $_SESSION;                                                                                                                                                                                                       
     259                 :                                                                                                                                                                                                                                 
     260                 :         echo "<tr>"                                                                                                                                                                                                             
     261                 :             ."<td class='tableCell' valign='top'>Tutor(en)</td>\n"                                                                                                                                                              
     262               0 :             ."<td class='tableCell'>"                                                                                                                                                                                           
     263               0 :             ."<table border='0' cellpadding='0' cellspacing='0'>";                                                                                                                                                              
     264                 :                                                                                                                                                                                                                                 
     265               0 :         foreach($assistents as $assistent) {                                                                                                                                                                                    
     266                 :             echo "<tr>"                                                                                                                                                                                                         
     267               0 :                 ."<td class='tableCell' >".Data::toHTML($assistent->lastname.", ".$assistent->firstname." (".$assistent->shortname, false).")</td>"                                                                             
     268               0 :                 ."<td class='tableCell' >&nbsp;<a href ='".PATH_TO_ROOT.SCRIPT_NAME."?action=deleteAssistent&amp;assistent=".$assistent->userid."'>Tutorenrecht entziehen</a>"                                                  
     269               0 :                 ."</td></tr>";                                                                                                                                                                                                  
     270               0 :         }                                                                                                                                                                                                                       
     271                 :                                                                                                                                                                                                                                 
     272                 :         echo "</table>"                                                                                                                                                                                                         
     273                 :             ."</td>\n"                                                                                                                                                                                                          
     274               0 :             ."<td class='tableCell'>";                                                                                                                                                                                          
     275               0 :         Utilities::help(57);                                                                                                                                                                                                    
     276               0 :         echo "</td></tr>\n";                                                                                                                                                                                                    
     277               0 :     }                                                                                                                                                                                                                           
     278                 :                                                                                                                                                                                                                                 
     279                 :     /**                                                                                                                                                                                                                         
     280                 :      * Gibt Zeile mit Auswahlmoeglichkeit fuer Tutoren aus.                                                                                                                                                                     
     281                 :      * Formularelement hat den Namen 'newAssistentID'. Auf den                                                                                                                                                                  
     282                 :      * Wert kann mit $newAssistentID zugegriffen werden.                                                                                                                                                                        
     283                 :      * Die Funktion wird nur aufgerufen, wenn es Veranstaltungsteilnehmer                                                                                                                                                       
     284                 :      * gibt, die kein Dozent oder Tutor sind.                                                                                                                                                                                   
     285                 :      * Wird kein Tutor ausgewaehlt, bekommt $newAssistentID                                                                                                                                                                     
     286                 :      * den Wert -1. Das verarbeitende Skript sollte dies ueberpruefen.                                                                                                                                                          
     287                 :      *                                                                                                                                                                                                                          
     288                 :      * @access private                                                                                                                                                                                                          
     289                 :      * @return void                                                                                                                                                                                                             
     290                 :      */                                                                                                                                                                                                                         
     291                 :     function printNewAssistentRow($noAssistents) {                                                                                                                                                                              
     292                 :         echo "<tr>"                                                                                                                                                                                                             
     293                 :             ."<td class='tableCell'>Tutor hinzuf&uuml;gen</td>\n"                                                                                                                                                               
     294               0 :             ."<td class='tableCell'><select name='newAssistentID'>"                                                                                                                                                             
     295               0 :             ."<option value='-1'>keinen-----------------------------------</option>";                                                                                                                                           
     296               0 :         foreach($noAssistents as $newAssistent) {                                                                                                                                                                               
     297               0 :             echo "<option value='".$newAssistent->userid."'";                                                                                                                                                                   
     298               0 :             if(isset($_POST['newAssistentID']) && ($_POST['newAssistentID'] == $newAssistent->userid)) {                                                                                                                        
     299               0 :                 echo " selected='selected'";                                                                                                                                                                                    
     300               0 :             }                                                                                                                                                                                                                   
     301               0 :             echo ">".Data::toHTML($newAssistent->lastname.", ".$newAssistent->firstname." (".$newAssistent->shortname, false).")</option>";                                                                                     
     302               0 :         }                                                                                                                                                                                                                       
     303                 :         echo "</select>"                                                                                                                                                                                                        
     304                 :             ."</td>\n"                                                                                                                                                                                                          
     305               0 :             ."<td class='tableCell'>";                                                                                                                                                                                          
     306               0 :         Utilities::help(58);                                                                                                                                                                                                    
     307               0 :         echo "</td></tr>\n";                                                                                                                                                                                                    
     308               0 :     }                                                                                                                                                                                                                           
     309                 :                                                                                                                                                                                                                                 
     310                 :     /**                                                                                                                                                                                                                         
     311                 :      * Gibt Zeile mit Eingabemoeglichkeit fuer Veranstaltungsnamen aus.                                                                                                                                                         
     312                 :      * Formularelement hat den Namen 'coursename'. Auf den Inhalt kann                                                                                                                                                          
     313                 :      * mit $coursename zugegriffen werden.                                                                                                                                                                                      
     314                 :      *                                                                                                                                                                                                                          
     315                 :      * @access private                                                                                                                                                                                                          
     316                 :      * @return void                                                                                                                                                                                                             
     317                 :      */                                                                                                                                                                                                                         
     318                 :     function printNameRow() {                                                                                                                                                                                                   
     319                 :         echo "<tr>"                                                                                                                                                                                                             
     320                 :             ."<td class='tableCell'>Veranstaltungsname</td>\n"                                                                                                                                                                  
     321               0 :             ."<td class='tableCell'>";                                                                                                                                                                                          
     322               0 :         if(isset($_POST['coursename'])) {                                                                                                                                                                                       
     323               0 :             echo "<p class='pForm'><input type='text' size='70' maxlength='120' name='coursename' value=\"".Data::toHTML($_POST['coursename'])."\" /></p>";                                                                     
     324               0 :         } else {                                                                                                                                                                                                                
     325               0 :             echo "<p class='pForm'><input type='text' size='70' maxlength='120' name='coursename' value=\"".Data::toHTML($this->settings->getName(), false)."\" /></p>";                                                        
     326                 :         }                                                                                                                                                                                                                       
     327                 :         echo "</td>\n"                                                                                                                                                                                                          
     328               0 :             ."<td class='tableCell'>";                                                                                                                                                                                          
     329               0 :         Utilities::help(50);                                                                                                                                                                                                    
     330               0 :         echo "</td></tr>\n";                                                                                                                                                                                                    
     331               0 :     }                                                                                                                                                                                                                           
     332                 :                                                                                                                                                                                                                                 
     333                 :     /**                                                                                                                                                                                                                         
     334                 :      * Gibt Zeile mit Eingabemoeglichkeit fuer Kurznamen aus.                                                                                                                                                                   
     335                 :      * Formularelement hat den Namen 'shortname'. Auf den Inhalt kann                                                                                                                                                           
     336                 :      * mit $shortname zugegriffen werden.                                                                                                                                                                                       
     337                 :      *                                                                                                                                                                                                                          
     338                 :      * @access  private                                                                                                                                                                                                         
     339                 :      * @return void                                                                                                                                                                                                             
     340                 :      */                                                                                                                                                                                                                         
     341                 :     function printShortNameRow() {                                                                                                                                                                                              
     342                 :         echo "<tr>"                                                                                                                                                                                                             
     343                 :             ."<td class='tableCell'>Kurzname</td>\n"                                                                                                                                                                            
     344               0 :             ."<td class='tableCell'>";                                                                                                                                                                                          
     345               0 :         if(isset($_POST['shortname'])) {                                                                                                                                                                                        
     346               0 :             echo "<p class='pForm'><input type='text' size='34' maxlength='25' name='shortname' value=\"".Data::toHTML($_POST['shortname'])."\" /></p>";                                                                        
     347               0 :         } else {                                                                                                                                                                                                                
     348               0 :             echo "<p class='pForm'><input type='text' size='34' maxlength='25' name='shortname' value=\"".Data::toHTML($this->settings->getShortname(), false)."\" /></p>";                                                     
     349                 :         }                                                                                                                                                                                                                       
     350                 :         echo "</td>\n"                                                                                                                                                                                                          
     351               0 :             ."<td class='tableCell'>";                                                                                                                                                                                          
     352               0 :         Utilities::help(50);                                                                                                                                                                                                    
     353               0 :         echo "</td></tr>\n";                                                                                                                                                                                                    
     354               0 :     }                                                                                                                                                                                                                           
     355                 :                                                                                                                                                                                                                                 
     356                 :       /**                                                                                                                                                                                                                       
     357                 :      * Gibt Zeile mit Eingabemoeglichkeit fuer Modulkürzel aus.                                                                                                                                                                
     358                 :      * Formularelement hat den Namen 'modulShortCut'.                                                                                                                                                                           
     359                 :      *                                                                                                                                                                                                                          
     360                 :      * @access  private                                                                                                                                                                                                         
     361                 :      * @return void                                                                                                                                                                                                             
     362                 :      */                                                                                                                                                                                                                         
     363                 :     function printModulShortCutRow() {                                                                                                                                                                                          
     364                 :         echo "<tr>"                                                                                                                                                                                                             
     365                 :             ."<td class='tableCell'>Modulkürzel</td>\n"                                                                                                                                                                        
     366               0 :             ."<td class='tableCell'>";                                                                                                                                                                                          
     367               0 :         if(isset($_POST['modulShortCut'])) {                                                                                                                                                                                    
     368               0 :             echo "<p class='pForm'><input type='text' size='34' maxlength='25' name='modulShortCut' value=\"".Data::toHTML($_POST['modulShortCut'])."\" /></p>";                                                                
     369               0 :         } else {                                                                                                                                                                                                                
     370               0 :             echo "<p class='pForm'><input type='text' size='34' maxlength='25' name='modulShortCut' value=\"".Data::toHTML($this->settings->getmodulShortCut(), false)."\" /></p>";                                             
     371                 :         }                                                                                                                                                                                                                       
     372                 :         echo "</td>\n"                                                                                                                                                                                                          
     373               0 :             ."<td class='tableCell'>";                                                                                                                                                                                          
     374               0 :         Utilities::help(50);                                                                                                                                                                                                    
     375               0 :         echo "</td></tr>\n";                                                                                                                                                                                                    
     376               0 :     }                                                                                                                                                                                                                           
     377                 :                                                                                                                                                                                                                                 
     378                 :     /**                                                                                                                                                                                                                         
     379                 :      * Gibt Zeile mit Eingabemoeglichkeit fuer Stichwörter aus.                                                                                                                                                                
     380                 :      * Formularelement hat den Namen 'keywords'. Auf den Inhalt kann                                                                                                                                                            
     381                 :      * mit $keywords zugegriffen werden.                                                                                                                                                                                        
     382                 :      *                                                                                                                                                                                                                          
     383                 :      * @access  private                                                                                                                                                                                                         
     384                 :      * @return void                                                                                                                                                                                                             
     385                 :      */                                                                                                                                                                                                                         
     386                 :     function printKeywords() {                                                                                                                                                                                                  
     387                 :         echo "<tr>"                                                                                                                                                                                                             
     388                 :             ."<td class='tableCell'>Stichwörter</td>\n"                                                                                                                                                                        
     389               0 :             ."<td class='tableCell'>";                                                                                                                                                                                          
     390               0 :         if(isset($_POST['keywords'])) {                                                                                                                                                                                         
     391               0 :             echo "<p class='pForm'><input type='text' size='34' maxlength='255' name='keywords' value=\"".Data::toHTML($_POST['keywords'])."\" /></p>";                                                                         
     392               0 :         } else {                                                                                                                                                                                                                
     393               0 :             echo "<p class='pForm'><input type='text' size='34' maxlength='255' name='keywords' value=\"".Data::toHTML($this->settings->getKeywords(), false)."\" /></p>";                                                      
     394                 :         }                                                                                                                                                                                                                       
     395                 :         echo "</td>\n"                                                                                                                                                                                                          
     396               0 :             ."<td class='tableCell'>";                                                                                                                                                                                          
     397               0 :         Utilities::help(59);                                                                                                                                                                                                    
     398               0 :         echo "</td></tr>\n";                                                                                                                                                                                                    
     399               0 :     }                                                                                                                                                                                                                           
     400                 :                                                                                                                                                                                                                                 
     401                 :     /**                                                                                                                                                                                                                         
     402                 :      * Gibt Zeile mit Auswahlmoeglichkeit fuer Semester aus.                                                                                                                                                                    
     403                 :      *                                                                                                                                                                                                                          
     404                 :      * @access private                                                                                                                                                                                                          
     405                 :      * @return void                                                                                                                                                                                                             
     406                 :      */                                                                                                                                                                                                                         
     407                 :     function printSemesterRow() {                                                                                                                                                                                               
     408                 :         echo "<tr>"                                                                                                                                                                                                             
     409                 :             ."<td class='tableCell'>Semester</td>\n"                                                                                                                                                                            
     410               0 :             ."<td class='tableCell'>";                                                                                                                                                                                          
     411               0 :         if(isset($_POST['semester'])) {                                                                                                                                                                                         
     412               0 :             CourseUtil::createSemesterListbox(2, $_POST['semester']);                                                                                                                                                           
     413               0 :         } else {                                                                                                                                                                                                                
     414               0 :             CourseUtil::createSemesterListbox(2, Course::semesterDBToString($this->settings->getSemester()));                                                                                                                   
     415                 :         }                                                                                                                                                                                                                       
     416                 :         echo "</td>\n"                                                                                                                                                                                                          
     417               0 :             ."<td class='tableCell'>";                                                                                                                                                                                          
     418               0 :         Utilities::help(51);                                                                                                                                                                                                    
     419               0 :         echo "</td></tr>\n";                                                                                                                                                                                                    
     420               0 :     }                                                                                                                                                                                                                           
     421                 :                                                                                                                                                                                                                                 
     422                 :     /**                                                                                                                                                                                                                         
     423                 :      * Gibt Zeile mit den Auswahlmoeglichkeit fuer einen kursspezifischen Style aus.                                                                                                                                            
     424                 :      *                                                                                                                                                                                                                          
     425                 :      * @access private                                                                                                                                                                                                          
     426                 :      * @return void                                                                                                                                                                                                             
     427                 :      */                                                                                                                                                                                                                         
     428                 :     function printStyleRow() {                                                                                                                                                                                                  
     429               0 :         echo "<tr>"."<td class='tableCell'>Kurs-/eCom-Style</td>\n"."<td class='tableCell'>";                                                                                                                                   
     430               0 :         $styles = Style::getStyleTemplates();                                                                                                                                                                                   
     431               0 :         echo "<p class='pForm'><select name='style' id='style'>";                                                                                                                                                               
     432               0 :         echo "<option value='' style='font-style: italic;'>Vom Benutzer gew&auml;hlter Style</option>";                                                                                                                         
     433               0 :         foreach($styles as $style) {                                                                                                                                                                                            
     434               0 :             echo "<option value=\"$style[0]\"".($style[0] == $this->settings->getStyle() ? " selected='selected'" : "") .">".Data::toHTML($style[1], false) ."</option>";                                                       
     435               0 :         }                                                                                                                                                                                                                       
     436               0 :         echo "</select></p>";                                                                                                                                                                                                   
     437               0 :         echo "</td>\n"."<td class='tableCell'>";                                                                                                                                                                                
     438               0 :         Utilities::help(60);                                                                                                                                                                                                    
     439               0 :         echo "</td></tr>\n";                                                                                                                                                                                                    
     440               0 :     }                                                                                                                                                                                                                           
     441                 :     /**                                                                                                                                                                                                                         
     442                 :      * Gibt Button aus um den Kurs zu archivieren, zu reaktivieren oder zu löschen                                                                                                                                             
     443                 :      *                                                                                                                                                                                                                          
     444                 :      * @access private                                                                                                                                                                                                          
     445                 :      * @return void                                                                                                                                                                                                             
     446                 :      */                                                                                                                                                                                                                         
     447                 :     function printCloseRow() {                                                                                                                                                                                                  
     448               0 :         global $db;                                                                                                                                                                                                             
     449                 :         echo "<tr>"                                                                                                                                                                                                             
     450                 :             ."<td class='tableCell'>&nbsp;</td>\n"                                                                                                                                                                              
     451               0 :             ."<td class='tableCell' align='center'>";                                                                                                                                                                           
     452               0 :         if ($this->settings->getClosed() == 0) {                                                                                                                                                                                
     453               0 :             echo  "<p class='pForm'><input type='submit' name='archiveCourse' value='Kurs/eCom archivieren'/></p>";                                                                                                             
     454               0 :         } else {                                                                                                                                                                                                                
     455               0 :             echo "<p class='pForm'><input type='submit' name='reactivateCourse' value='Kurs/eCom reaktivieren'/></p>";                                                                                                          
     456                 :         }                                                                                                                                                                                                                       
     457               0 :         echo " <p class='pForm'><input type='submit' name='openCourse' value='Kurs/eCom &ouml;ffnen'/></p>\n";                                                                                                                  
     458               0 :         echo " <p class='pForm'><input type='submit' name='deleteCourse' value='Kurs/eCom l&ouml;schen'/></p>";                                                                                                                 
     459               0 :         if ($this->isCourse()) {                                                                                                                                                                                                
     460               0 :             echo "\n<p class='pForm'><input type='submit' name='changeEcomToCourse' value='In eCommunity umwandeln'/></p></td>\n";                                                                                              
     461               0 :         } else {                                                                                                                                                                                                                
     462               0 :             echo "</td>\n";                                                                                                                                                                                                     
     463                 :         }                                                                                                                                                                                                                       
     464               0 :         echo "<td class='tableCell'>";                                                                                                                                                                                          
     465               0 :         Utilities::help(0);                                                                                                                                                                                                     
     466               0 :         echo "</td></tr>\n";                                                                                                                                                                                                    
     467               0 :     }                                                                                                                                                                                                                           
     468                 :                                                                                                                                                                                                                                 
     469                 :     private function isCourse() {                                                                                                                                                                                               
     470               0 :         return $this->settings->getCourseType() == 'course';                                                                                                                                                                    
     471                 :     }                                                                                                                                                                                                                           
     472                 :                                                                                                                                                                                                                                 
     473                 :     /**                                                                                                                                                                                                                         
     474                 :      * Gibt Buttons aus um die Sichtweise des Dozenten zu ändern                                                                                                                                                               
     475                 :      *                                                                                                                                                                                                                          
     476                 :      * @access private                                                                                                                                                                                                          
     477                 :      * @return void                                                                                                                                                                                                             
     478                 :      */                                                                                                                                                                                                                         
     479                 :     function printChangeViewRow() {                                                                                                                                                                                             
     480                 :        echo "<tr>"                                                                                                                                                                                                              
     481                 :             ."<td class='tableCell' valign='top'>Sichtweise f&uuml;r diesen Kurs</td>\n"                                                                                                                                        
     482               0 :             ."<td class='tableCell' align='center'><p class='pForm'><input type='submit' name='changeToStudent' value='Student'/></p> <p class='pForm'><input type='submit' name='changeToAssistent' value='Tutor'/></p></td>\n"
     483               0 :             ."<td class='tableCell'>";                                                                                                                                                                                          
     484               0 :       Utilities::help(0);                                                                                                                                                                                                       
     485               0 :       echo "</td></tr>\n";                                                                                                                                                                                                      
     486               0 :     }                                                                                                                                                                                                                           
     487                 :                                                                                                                                                                                                                                 
     488                 :     /**                                                                                                                                                                                                                         
     489                 :      * Gibt Zeile mit Eingabemoeglichkeit fuer Veranstaltungs-Info aus.                                                                                                                                                         
     490                 :      * Formularelement (Textarea) hat den Namen 'info'. Es kann mit $info                                                                                                                                                       
     491                 :      * auf den Inhalt zugegriffen werden.                                                                                                                                                                                       
     492                 :      *                                                                                                                                                                                                                          
     493                 :      * @access private                                                                                                                                                                                                          
     494                 :      * @return void                                                                                                                                                                                                             
     495                 :      */                                                                                                                                                                                                                         
     496                 :     function printInfoRow() {                                                                                                                                                                                                   
     497               0 :         $info = trim($this->settings->getInfo());                                                                                                                                                                               
     498                 :         echo "<tr>"                                                                                                                                                                                                             
     499               0 :             ."<td class='tableCell' valign='top'>Allgemein zug&auml;nglicher Info-Text<br />(".BBCode::getTagOverviewLink("Formatierungs-<br />m&ouml;glichkeiten").")</td>\n"                                                  
     500               0 :             ."<td class='tableCell'>";                                                                                                                                                                                          
     501               0 :         if(isset($_POST['info'])) {                                                                                                                                                                                             
     502               0 :             echo "<textarea name='info' rows='13' cols='70' >".Data::toHTML($_POST['info'])."</textarea>";                                                                                                                      
     503               0 :         } else {                                                                                                                                                                                                                
     504               0 :             echo "<textarea name='info' rows='13' cols='70' >".Data::toHTML($info, false)."</textarea>";                                                                                                                        
     505                 :         }                                                                                                                                                                                                                       
     506                 :         echo "</td>\n"                                                                                                                                                                                                          
     507               0 :             ."<td class='tableCell'>";                                                                                                                                                                                          
     508               0 :         Utilities::help(54);                                                                                                                                                                                                    
     509               0 :         echo "</td></tr>\n";                                                                                                                                                                                                    
     510               0 :     }                                                                                                                                                                                                                           
     511                 :                                                                                                                                                                                                                                 
     512                 :     /**                                                                                                                                                                                                                         
     513                 :      * Gibt Zeile mit Eingabemoeglichkeit fuer eine URL aus.                                                                                                                                                                    
     514                 :      * Formularelement hat den Namen 'faqurl'. Die URL wird                                                                                                                                                                     
     515                 :      * in der Fusszeile eingeblendet, wenn gesetzt.                                                                                                                                                                             
     516                 :      *                                                                                                                                                                                                                          
     517                 :      * @access  private                                                                                                                                                                                                         
     518                 :      * @return void                                                                                                                                                                                                             
     519                 :      */                                                                                                                                                                                                                         
     520                 :     function printFaqRow() {                                                                                                                                                                                                    
     521               0 :         if (isset($_POST['faqurl'])) $faqurl = $_POST['faqurl'];                                                                                                                                                                
     522               0 :         else $faqurl = $this->settings->getFAQ();                                                                                                                                                                               
     523               0 :         echo "<tr>"."<td class='tableCell'>Kurs-/eCom-FAQ</td>\n"."<td class='tableCell'>";                                                                                                                                     
     524               0 :         echo "<p class='pForm'><input type='text' size='34' maxlength='255' name='faqurl' value=\"".Data::toHTML($faqurl) ."\" /></p>";                                                                                         
     525               0 :         echo "</td>\n"."<td class='tableCell'>";                                                                                                                                                                                
     526               0 :         Utilities::help(11834);                                                                                                                                                                                                 
     527               0 :         echo "</td></tr>\n";                                                                                                                                                                                                    
     528               0 :     }                                                                                                                                                                                                                           
     529                 :     /**                                                                                                                                                                                                                         
     530                 :      * Gibt Zeile mit Eingabemoeglichkeit fuer                                                                                                                                                                                  
     531                 :      * Start-und Enddatum des Anmeldeverfahrens aus.                                                                                                                                                                            
     532                 :      *                                                                                                                                                                                                                          
     533                 :      * @access private                                                                                                                                                                                                          
     534                 :      * @return void                                                                                                                                                                                                             
     535                 :      */                                                                                                                                                                                                                         
     536                 :     function printPeriodRow() {                                                                                                                                                                                                 
     537               0 :         $openDate   = $this->settings->getOpendate();                                                                                                                                                                           
     538               0 :         $closeDate  = $this->settings->getClosedate();                                                                                                                                                                          
     539               0 :         $openSelect = new DateSelection(substr($openDate,8,2),substr($openDate,5,2),substr($openDate,0,4));                                                                                                                     
     540               0 :         $closeSelect   = new DateSelection(substr($closeDate,8,2),substr($closeDate,5,2),substr($closeDate,0,4));                                                                                                               
     541               0 :         $openSelect->autoUpdate = true;                                                                                                                                                                                         
     542               0 :         $closeSelect->autoUpdate = true;                                                                                                                                                                                        
     543               0 :         $openSelect->formName = "courseSettings";                                                                                                                                                                               
     544               0 :         $closeSelect->formName = "courseSettings";                                                                                                                                                                              
     545                 :         // Falls Seite durch Datumswechsel neu geladen...                                                                                                                                                                       
     546               0 :         if(isset($_POST['openDate_year'])) {                                                                                                                                                                                    
     547               0 :             $openSelect->setDate($_POST['openDate_day'],$_POST['openDate_month'],$_POST['openDate_year']);                                                                                                                      
     548               0 :             $closeSelect->setDate($_POST['closeDate_day'],$_POST['closeDate_month'],$_POST['closeDate_year']);                                                                                                                  
     549               0 :         }                                                                                                                                                                                                                       
     550                 :         echo "<tr>"                                                                                                                                                                                                             
     551                 :             ."<td class='tableCell'>Startdatum</td>\n"                                                                                                                                                                          
     552               0 :             ."<td class='tableCell'>";                                                                                                                                                                                          
     553               0 :         $openSelect->printCalender("openDate", 'date');                                                                                                                                                                         
     554                 :         echo "</td>\n"                                                                                                                                                                                                          
     555               0 :             ."<td class='tableCell'>";                                                                                                                                                                                          
     556               0 :         Utilities::help(53);                                                                                                                                                                                                    
     557               0 :         echo "</td></tr>\n";                                                                                                                                                                                                    
     558                 :                                                                                                                                                                                                                                 
     559                 :         echo "<tr>"                                                                                                                                                                                                             
     560                 :             ."<td class='tableCell'>Enddatum</td>\n"                                                                                                                                                                            
     561               0 :             ."<td class='tableCell'>";                                                                                                                                                                                          
     562               0 :         $closeSelect->printCalender("closeDate", 'date');                                                                                                                                                                       
     563                 :         echo "</td>\n"                                                                                                                                                                                                          
     564               0 :             ."<td class='tableCell'>";                                                                                                                                                                                          
     565               0 :         Utilities::help(53);                                                                                                                                                                                                    
     566               0 :         echo "</td></tr>\n";                                                                                                                                                                                                    
     567               0 :     }                                                                                                                                                                                                                           
     568                 :                                                                                                                                                                                                                                 
     569                 :     /**                                                                                                                                                                                                                         
     570                 :      * Gibt Zeile mit Eingabemoeglichkeit fuer Veranstaltungs-Anmeldepasswort aus.                                                                                                                                              
     571                 :      * Auf den Wert kann ueber 'regpass' zugegriffen werden.                                                                                                                                                                    
     572                 :      *                                                                                                                                                                                                                          
     573                 :      * @access private                                                                                                                                                                                                          
     574                 :      * @return void                                                                                                                                                                                                             
     575                 :      */                                                                                                                                                                                                                         
     576                 :     function printPasswordRow() {                                                                                                                                                                                               
     577                 :         echo "<tr>"                                                                                                                                                                                                             
     578                 :             ."<td class='tableCell'>Anmeldepasswort</td>\n"                                                                                                                                                                     
     579               0 :             ."<td class='tableCell'>";                                                                                                                                                                                          
     580               0 :         if(isset($_POST['regpass'])) {                                                                                                                                                                                          
     581               0 :             echo "<p class='pForm'><input type='text' name='regpass' size='34' maxlength='32' value=\"".Data::toHTML($_POST['regpass'])."\" /></p>";                                                                            
     582               0 :         } else {                                                                                                                                                                                                                
     583               0 :             echo "<p class='pForm'><input type='text' name='regpass' size='34' maxlength='32' value=\"".Data::toHTML($this->settings->getRegpass(), false)."\" /></p>";                                                         
     584                 :         }                                                                                                                                                                                                                       
     585                 :         echo "</td>\n"                                                                                                                                                                                                          
     586               0 :             ."<td class='tableCell'>";                                                                                                                                                                                          
     587               0 :         Utilities::help(52);                                                                                                                                                                                                    
     588               0 :         echo "</td></tr>\n";                                                                                                                                                                                                    
     589               0 :     }                                                                                                                                                                                                                           
     590                 :                                                                                                                                                                                                                                 
     591                 :     /**                                                                                                                                                                                                                         
     592                 :      * Gibt Zeile mit Auswahlmoeglichkeit fuer die Benutzung einer Warteliste aus.                                                                                                                                              
     593                 :      * Auf den Wert kann ueber 'usewaitinglist' zugegriffen werden.                                                                                                                                                             
     594                 :      *                                                                                                                                                                                                                          
     595                 :      * @access private                                                                                                                                                                                                          
     596                 :      * @return void                                                                                                                                                                                                             
     597                 :      */                                                                                                                                                                                                                         
     598                 :     function printUseWaitinglistRow() {                                                                                                                                                                                         
     599                 :         echo "<tr>"                                                                                                                                                                                                             
     600                 :             ."<td class='tableCell'></td>\n"                                                                                                                                                                                    
     601               0 :             ."<td class='tableCell'>";                                                                                                                                                                                          
     602               0 :         if(isset($_POST['usewaitinglist']) || ($this->settings->getUseWaitinglist() == 1)) {                                                                                                                                    
     603               0 :             echo "<p class='pForm'><input type='checkbox' id='usewaitinglist' name='usewaitinglist' value='1' checked='checked'/> <label for='usewaitinglist'>Warteliste verwenden</label></p>";                                
     604               0 :         } else {                                                                                                                                                                                                                
     605               0 :             echo "<p class='pForm'><input type='checkbox' id='usewaitinglist' name='usewaitinglist' value='0'/> <label for='usewaitinglist'>Warteliste verwenden</label></p>";                                                  
     606                 :         }                                                                                                                                                                                                                       
     607                 :         echo "</td>\n"                                                                                                                                                                                                          
     608               0 :             ."<td class='tableCell'>";                                                                                                                                                                                          
     609               0 :         Utilities::help(0);                                                                                                                                                                                                     
     610               0 :         echo "</td></tr>\n";                                                                                                                                                                                                    
     611               0 :     }                                                                                                                                                                                                                           
     612                 :                                                                                                                                                                                                                                 
     613                 :     /**                                                                                                                                                                                                                         
     614                 :      * Gibt Zeile mit Eingabemoeglichkeit fuer die maximale Anzahl der                                                                                                                                                          
     615                 :      * Studenten aus.                                                                                                                                                                                                           
     616                 :      * Auf den Wert kann ueber 'maxstudents' zugegriffen werden.                                                                                                                                                                
     617                 :      *                                                                                                                                                                                                                          
     618                 :      * @access private                                                                                                                                                                                                          
     619                 :      * @return void                                                                                                                                                                                                             
     620                 :      */                                                                                                                                                                                                                         
     621                 :     function printMaxStudentsRow() {                                                                                                                                                                                            
     622                 :         echo "<tr>"                                                                                                                                                                                                             
     623                 :             ."<td class='tableCell'>max. Teilnehmerzahl</td>\n"                                                                                                                                                                 
     624               0 :             ."<td class='tableCell'>";                                                                                                                                                                                          
     625               0 :         if(isset($_POST['maxstudents'])) {                                                                                                                                                                                      
     626               0 :             echo "<p class='pForm'><input type='text' size='3' maxlength='5' name='maxstudents' value=\"".Data::toHTML($_POST['maxstudents'])."\" /></p>";                                                                      
     627               0 :         } else {                                                                                                                                                                                                                
     628               0 :             echo "<p class='pForm'><input type='text' size='3' maxlength='5' name='maxstudents' value=\"".$this->settings->getMaxStudents()."\" /></p>";                                                                        
     629                 :         }                                                                                                                                                                                                                       
     630                 :         echo "</td>\n"                                                                                                                                                                                                          
     631               0 :             ."<td class='tableCell'>";                                                                                                                                                                                          
     632               0 :         Utilities::help(0);                                                                                                                                                                                                     
     633               0 :         echo "</td></tr>\n";                                                                                                                                                                                                    
     634               0 :     }                                                                                                                                                                                                                           
     635                 :                                                                                                                                                                                                                                 
     636                 :     /**                                                                                                                                                                                                                         
     637                 :      * Gibt die Kopfelemente aus.                                                                                                                                                                                               
     638                 :      *                                                                                                                                                                                                                          
     639                 :      * @access private                                                                                                                                                                                                          
     640                 :      * @return void                                                                                                                                                                                                             
     641                 :      */                                                                                                                                                                                                                         
     642                 :     function printHeadAddUser() {                                                                                                                                                                                               
     643                 :       echo "<form action='./settings.php' method='post' >\n"                                                                                                                                                                    
     644               0 :           ."<table class='tableBorder' border='0' cellpadding='0' cellspacing='0'>\n";                                                                                                                                          
     645               0 :     }                                                                                                                                                                                                                           
     646                 :                                                                                                                                                                                                                                 
     647                 :    /**                                                                                                                                                                                                                          
     648                 :      * Gibt Liste von Benutzern aus, die manuell zum kurs hinzugefuegt werden koennen.                                                                                                                                          
     649                 :      *                                                                                                                                                                                                                          
     650                 :      * @access private                                                                                                                                                                                                          
     651                 :      * @return void                                                                                                                                                                                                             
     652                 :      */                                                                                                                                                                                                                         
     653                 :     function printAddUserRow()                                                                                                                                                                                                  
     654                 :     {                                                                                                                                                                                                                           
     655               0 :       global $db,$_SESSION;                                                                                                                                                                                                     
     656               0 :       $userIDs = $db->get_col("SELECT userID                                                                                                                                                                                    
     657                 :                                  FROM user_course                                                                                                                                                                               
     658               0 :                                  WHERE courseID=".$_SESSION["course"]);                                                                                                                                                         
     659                 :                                                                                                                                                                                                                                 
     660               0 :       if (!empty($userIDs)) {                                                                                                                                                                                                   
     661               0 :         $userIDs = ",".implode(",", $userIDs);                                                                                                                                                                                  
     662               0 :       } else {                                                                                                                                                                                                                  
     663               0 :         $userIDs = "";                                                                                                                                                                                                          
     664                 :       }                                                                                                                                                                                                                         
     665               0 :       $users = $db->get_results("SELECT Vorname, Nachname, ID, Usergroup                                                                                                                                                        
     666                 :                                  FROM user                                                                                                                                                                                      
     667               0 :                                  WHERE ID NOT IN (1,3$userIDs)                                                                                                                                                                  
     668               0 :                                  ORDER BY Nachname, Vorname");                                                                                                                                                                  
     669                 :       echo "<tr>"                                                                                                                                                                                                               
     670               0 :           ."<td class='tableCell' colspan='3' align='center'>";                                                                                                                                                                 
     671               0 :       if($db->num_rows > 0)                                                                                                                                                                                                     
     672               0 :       {                                                                                                                                                                                                                         
     673               0 :         echo "<select size='10' multiple='multiple' name='addUserID[]'>";                                                                                                                                                       
     674                 :                                                                                                                                                                                                                                 
     675               0 :         foreach ($users as $user)                                                                                                                                                                                               
     676                 :         {                                                                                                                                                                                                                       
     677               0 :           $admin = "";                                                                                                                                                                                                          
     678               0 :           if ($user->Usergroup == ADMIN) $admin = " (Admin)";                                                                                                                                                                   
     679               0 :           echo "<option value='".$user->ID."'>".Data::toHTML($user->Nachname.", ".$user->Vorname, false)."$admin</option>";                                                                                                     
     680               0 :         }                                                                                                                                                                                                                       
     681               0 :         echo "</select>";                                                                                                                                                                                                       
     682               0 :       }                                                                                                                                                                                                                         
     683               0 :       else echo "keine Benutzer";                                                                                                                                                                                               
     684                 :                                                                                                                                                                                                                                 
     685               0 :       echo "</td></tr>";                                                                                                                                                                                                        
     686               0 :     }                                                                                                                                                                                                                           
     687                 :                                                                                                                                                                                                                                 
     688                 :   /**                                                                                                                                                                                                                           
     689                 :      * Gibt die Fusselemente ohne abschliessendem table aus.                                                                                                                                                                    
     690                 :      *                                                                                                                                                                                                                          
     691                 :      * @access private                                                                                                                                                                                                          
     692                 :      * @return void                                                                                                                                                                                                             
     693                 :      */                                                                                                                                                                                                                         
     694                 :     function printFoot() {                                                                                                                                                                                                      
     695                 :         echo "<tr>"                                                                                                                                                                                                             
     696                 :             ."<td class='text12' colspan='3' align='center'>"                                                                                                                                                                   
     697               0 :             ."<hr />"                                                                                                                                                                                                           
     698               0 :             ."<p class='pForm'><input type='submit' name='reset' value='Zur&uuml;cksetzen'/></p> "                                                                                                                              
     699               0 :             ."<p class='pForm'><input type='submit' name='save' value='Speichern'/></p>"                                                                                                                                        
     700               0 :             ."</td>"                                                                                                                                                                                                            
     701               0 :             ."</tr>"                                                                                                                                                                                                            
     702               0 :             ."</table>"                                                                                                                                                                                                         
     703               0 :             ."</form>";                                                                                                                                                                                                         
     704               0 :     }                                                                                                                                                                                                                           
     705                 :                                                                                                                                                                                                                                 
     706                 :       /**                                                                                                                                                                                                                       
     707                 :      * Gibt die Fusselemente mit abschliessendem table aus.                                                                                                                                                                     
     708                 :      *                                                                                                                                                                                                                          
     709                 :      * @access private                                                                                                                                                                                                          
     710                 :      * @return void                                                                                                                                                                                                             
     711                 :      */                                                                                                                                                                                                                         
     712                 :     function printFootAddUser() {                                                                                                                                                                                               
     713                 :         echo "<tr>"                                                                                                                                                                                                             
     714                 :             ."<td class='text12' colspan='3' align='center'>"                                                                                                                                                                   
     715               0 :             ."<hr />"                                                                                                                                                                                                           
     716               0 :             ."<p class='pForm'><input type='submit' name='addUser' value='Hinzuf&uuml;gen'/></p>"                                                                                                                               
     717               0 :             ."</td>"                                                                                                                                                                                                            
     718               0 :             ."</tr>"                                                                                                                                                                                                            
     719               0 :             ."</table>"                                                                                                                                                                                                         
     720               0 :             ."</form>";                                                                                                                                                                                                         
     721               0 :     }                                                                                                                                                                                                                           
     722                 :                                                                                                                                                                                                                                 
     723                 :     function printAssist() {                                                                                                                                                                                                    
     724                 :         echo "Assistens-Modus aktiviert <br>" .                                                                                                                                                                                 
     725               0 :             "Hier können alle Einstellungen des Kurses getätigt werden <br>" .                                                                                                                                                
     726               0 :             "Nach den Einstellungen müssen nur noch die gewünschten Module aktiviert werden. <br>";                                                                                                                           
     727               0 :     }                                                                                                                                                                                                                           
     728                 :                                                                                                                                                                                                                                 
     729                 :     function printTeachersDesc() {                                                                                                                                                                                              
     730                 :         echo "<tr>".                                                                                                                                                                                                            
     731               0 :             "<td colspan='3'>Hier können Sie über die Dropdown-Box weitere Dozenten bzw. Morderatoren wählen.".                                                                                                              
     732               0 :             "Diese werden die selben Berechtigungen haben, wie sie selbst</td>".                                                                                                                                                
     733               0 :             "</tr>";                                                                                                                                                                                                            
     734               0 :     }                                                                                                                                                                                                                           
     735                 :                                                                                                                                                                                                                                 
     736                 :   function printSubscribeDesc() {                                                                                                                                                                                               
     737                 :         echo "<tr>".                                                                                                                                                                                                            
     738               0 :             "<td colspan='3'>Hier finden sie die Optionen für das Anmeldeverfahren zu ihrem Kurs <br>".                                                                                                                        
     739               0 :             "Mit einem Anmeldepasswort können Sie den Zugriff auf ihren Kurs beschränken.".                                                                                                                                   
     740               0 :             "Startdatum und Enddatum geben die Zeit an, in der es möglich sein wird sich zu ihrem Kurs anzumelden. <br>".                                                                                                      
     741               0 :             "Wenn Sie eine Warteliste verwenden müssen alle Angemeldeten zuerst auf eine Freigabe von ihnen warten.".                                                                                                          
     742               0 :             "</td></tr>";                                                                                                                                                                                                       
     743               0 :     }                                                                                                                                                                                                                           
     744                 :                                                                                                                                                                                                                                 
     745                 :  function printViewDesc() {                                                                                                                                                                                                     
     746                 :         echo "<tr>".                                                                                                                                                                                                            
     747               0 :             "<td colspan='3'>Hier können sie die Sicht auf ihren Kurs kurzzeitig ändern, um etwa zu üperprüfen, welche Module und Optionen Studenten sehen werden".                                                         
     748               0 :             "</td></tr>";                                                                                                                                                                                                       
     749               0 :     }                                                                                                                                                                                                                           
     750                 : }                                                                                                                                                                                                                               

Generated by PHPUnit 3.2.21 and Xdebug 2.0.4 at Sat Nov 7 22:04:08 CET 2009.